/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.lczyfz.wisdom.modules.platform.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lczyfz.wisdom.common.persistence.DataEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 订单Entity
 * @author css
 * @version 2019-09-26
 */
@ApiModel(value="用户订单")
public class Order extends DataEntity<Order> {
	
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户id",name = "userId",required = true,example = "23923823919201")
	private String userId;		// 用户id
	@ApiModelProperty(value = "上门地址详情id",name = "visitadd",required = true,example = "addressId")
	private String addressId;		// 上门地址详情id
	@ApiModelProperty(value = "上门时间",name = "visitdate",required = true,example = "2019:10:07")
	private Date visitdate;		// 上门时间
	@ApiModelProperty(value = "用户留言",name = "onlineword",example = "")
	private String onlineword;		// 留言
	@ApiModelProperty(value = "订单状态",name = "state",required = true,example = "0")
	private String state;		// 订单状态 0未开始/1已完成
	@ApiModelProperty(value = "预约的主题",name = "title",required = true,example = "0")
	private String title;		// 预约的主题

	private Address address;//收货地址对象

	public Order(){
	}
	public Order(String id){
		super(id);
	}

	@Length(min=1, max=64, message="用户id长度必须介于 1 和 64 之间")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId){this.userId = userId;}

	public String getAddressId() {
		return addressId;
	}

	public void setAddressId(String addressId) {
		this.addressId = addressId;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getVisitdate() {
		return visitdate;
	}

	public void setVisitdate(Date visitdate) {
		this.visitdate = visitdate;
	}
	
	@Length(min=0, max=2000, message="留言长度必须介于 0 和 2000 之间")
	public String getOnlineword() {
		return onlineword;
	}

	public void setOnlineword(String onlineword) {
		this.onlineword = onlineword;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}
}